<?php

// $model

use backend\models\Article;
use backend\models\ArticleCategory;
use yii\bootstrap\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;

$this->title = "文章回收站列表";

$this->params['breadcrumbs'][]= ['label'=>\Yii::$app->controller->id,'url'=>['article/list']];

$this->params['breadcrumbs'][]=$this->title;

?>

<div class="container table-responsive">
    <table class="table table-hover">
        <tr>
            <td>名称</td>
            <td>简介</td>
            <td>状态</td>
            <td>排序</td>
            <td>输入时间</td>
            <td>操作</td>
        </tr>
        <?php foreach($models as $model): ?>
            <tr>
                <td><?=$model->name?></td>
                <td><?=$model->intro?></td>
                <td><?=Article::$statusValue[$model->status]?></td>
                <td><?=$model->sort?></td>
                <td><?=date('y-m-d h:m:s',$model->inputtime)?></td>
                <td>
                <?=Html::a('恢复',['article/recovery','id'=>$model->id],['class'=>'btn btn-info'])?>
                <?=Html::a('彻底删除',Url::to(['article/delete','id'=>$model->id]),[
                    'class'=>'btn btn-danger',
                    'data'=>[
                        'confirm'=>"确定彻底删除吗?",
                        'method'=>'post',
                    ],
                ]);?>
                </td>
            </tr>
        <?php endforeach;?>
    </table>

    <?=LinkPager::widget([
        'pagination'=>$pager,
        'prevPageLabel'=>'上一页',
        'nextPageLabel'=>'下一页',
    ])?>


</div>
